package ch18.v3.service;

import ch18.v3.model.Student;
import ch18.v3.Dao.StudentManagerDao;

import java.util.List;

public class StudentManagerServiceImpl implements StudentManagerService {

    public StudentManagerDao studentManagerDao;

    public StudentManagerServiceImpl() {
        studentManagerDao = new StudentManagerDao();
    }

    @Override
    public void add(Student student) {
        studentManagerDao.add(student);
    }

    @Override
    public void delete(String stuNo) {
        studentManagerDao.delete(stuNo);
    }

    @Override
    public void update(Student student) {
        studentManagerDao.update(student);
    }

    @Override
    public List<Student> queryLists(){
        return studentManagerDao.queryLists();
    }


    @Override
    public Student query(String stuNo) {
        return studentManagerDao.query(stuNo);
    }
}
